/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.androidpublisher.model;

/**
 * Details of a line item.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Play Android Developer API. For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class LineItem extends com.google.api.client.json.GenericJson {

  /**
   * Item's listed price on Play Store, this may or may not include tax. Excludes any discounts or
   * promotions.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Money listingPrice;

  /**
   * Details of a one-time purchase.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private OneTimePurchaseDetails oneTimePurchaseDetails;

  /**
   * Details of a paid app purchase.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private PaidAppDetails paidAppDetails;

  /**
   * The purchased product ID or in-app SKU (for example, 'monthly001' or 'com.some.thing.inapp1').
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String productId;

  /**
   * Developer-specified name of the product. Displayed in buyer's locale. Example: coins, monthly
   * subscription, etc.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String productTitle;

  /**
   * Details of a subscription purchase.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SubscriptionDetails subscriptionDetails;

  /**
   * The tax paid for this line item.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Money tax;

  /**
   * The total amount paid by the user for this line item, taking into account discounts and tax.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Money total;

  /**
   * Item's listed price on Play Store, this may or may not include tax. Excludes any discounts or
   * promotions.
   * @return value or {@code null} for none
   */
  public Money getListingPrice() {
    return listingPrice;
  }

  /**
   * Item's listed price on Play Store, this may or may not include tax. Excludes any discounts or
   * promotions.
   * @param listingPrice listingPrice or {@code null} for none
   */
  public LineItem setListingPrice(Money listingPrice) {
    this.listingPrice = listingPrice;
    return this;
  }

  /**
   * Details of a one-time purchase.
   * @return value or {@code null} for none
   */
  public OneTimePurchaseDetails getOneTimePurchaseDetails() {
    return oneTimePurchaseDetails;
  }

  /**
   * Details of a one-time purchase.
   * @param oneTimePurchaseDetails oneTimePurchaseDetails or {@code null} for none
   */
  public LineItem setOneTimePurchaseDetails(OneTimePurchaseDetails oneTimePurchaseDetails) {
    this.oneTimePurchaseDetails = oneTimePurchaseDetails;
    return this;
  }

  /**
   * Details of a paid app purchase.
   * @return value or {@code null} for none
   */
  public PaidAppDetails getPaidAppDetails() {
    return paidAppDetails;
  }

  /**
   * Details of a paid app purchase.
   * @param paidAppDetails paidAppDetails or {@code null} for none
   */
  public LineItem setPaidAppDetails(PaidAppDetails paidAppDetails) {
    this.paidAppDetails = paidAppDetails;
    return this;
  }

  /**
   * The purchased product ID or in-app SKU (for example, 'monthly001' or 'com.some.thing.inapp1').
   * @return value or {@code null} for none
   */
  public java.lang.String getProductId() {
    return productId;
  }

  /**
   * The purchased product ID or in-app SKU (for example, 'monthly001' or 'com.some.thing.inapp1').
   * @param productId productId or {@code null} for none
   */
  public LineItem setProductId(java.lang.String productId) {
    this.productId = productId;
    return this;
  }

  /**
   * Developer-specified name of the product. Displayed in buyer's locale. Example: coins, monthly
   * subscription, etc.
   * @return value or {@code null} for none
   */
  public java.lang.String getProductTitle() {
    return productTitle;
  }

  /**
   * Developer-specified name of the product. Displayed in buyer's locale. Example: coins, monthly
   * subscription, etc.
   * @param productTitle productTitle or {@code null} for none
   */
  public LineItem setProductTitle(java.lang.String productTitle) {
    this.productTitle = productTitle;
    return this;
  }

  /**
   * Details of a subscription purchase.
   * @return value or {@code null} for none
   */
  public SubscriptionDetails getSubscriptionDetails() {
    return subscriptionDetails;
  }

  /**
   * Details of a subscription purchase.
   * @param subscriptionDetails subscriptionDetails or {@code null} for none
   */
  public LineItem setSubscriptionDetails(SubscriptionDetails subscriptionDetails) {
    this.subscriptionDetails = subscriptionDetails;
    return this;
  }

  /**
   * The tax paid for this line item.
   * @return value or {@code null} for none
   */
  public Money getTax() {
    return tax;
  }

  /**
   * The tax paid for this line item.
   * @param tax tax or {@code null} for none
   */
  public LineItem setTax(Money tax) {
    this.tax = tax;
    return this;
  }

  /**
   * The total amount paid by the user for this line item, taking into account discounts and tax.
   * @return value or {@code null} for none
   */
  public Money getTotal() {
    return total;
  }

  /**
   * The total amount paid by the user for this line item, taking into account discounts and tax.
   * @param total total or {@code null} for none
   */
  public LineItem setTotal(Money total) {
    this.total = total;
    return this;
  }

  @Override
  public LineItem set(String fieldName, Object value) {
    return (LineItem) super.set(fieldName, value);
  }

  @Override
  public LineItem clone() {
    return (LineItem) super.clone();
  }

}
